function test(a, b, c) {
    console.log(this.aa, a, b, c);
}
var obj = {
        aa: 'hh'
    };
    (function () {
        function myCall(thisArg, ...args) {
            const that = thisArg || window;
            that.attr = this;
            return that.attr(...args);;
        }

        function myApply(thisArg, args) {
            const that = thisArg || window;
            that.attr = this;
            return that.attr(...args);;
        }

        function myBind(thisArg, ...args) {
            const that = thisArg || window;
            that.attr = this;
            return function () {
                return that.attr(...[...args, ...arguments]);
            }
        }
        Function.prototype.myCall = myCall;
        Function.prototype.myApply = myApply;
        Function.prototype.myBind = myBind;
    })();